<?php
include('../_fonction/fonction.php');

if(count($_POST)>0){

$nom = $_POST['nom'];
$prenom = $_POST['prenom'];
$initiale = $_POST['initiale'];
$genre = $_POST['genre'];
$email = $_POST['email'];
$type_ins = $_POST['type_ins'];
$institution = $_POST['institution'];
$type_instit = $_POST['type_instit'];
$laboratoire = $_POST['laboratoire'];
$statut = $_POST['statut'];
$adresse = $_POST['adresse'];
$ville = $_POST['ville'];
$zip = $_POST['zip'];
$etat = $_POST['etat'];
$pays = $_POST['pays'];
$mobile = $_POST['mobile'];
$tel = $_POST['tel'];
$nationalite = $_POST['nationalite'];
$nb_resume = $_POST['nb_resume'];
$alimentation = $_POST['alimentation'];
$intolerance  = $_POST['intolerance'];
$id = $_POST['id'];
/*
retour.=('#').value&
retour.=('#nom').value&
retour.=('#prenom').value&
retour.=('#initiale ').value&
retour.=('#genre').value&
retour.=('#email').value&
retour.=('#type_ins').value&
retour.=('#institution').value&
retour.=('#type_instit').value&
retour.=('#laboratoire').value&
retour.=('#statut').value&
retour.=('#adresse').value&
retour.=('#ville').value&
retour.=('#zip').value&
retour.=('#etat').value&
retour.=('#pays').value&
retour.=('#mobile').value&
retour.=('#tel').value&
retour.=('#nationalite').value&
retour.=('#nb_resume').value&
retour.=('#alimentation').value&
retour.=('#intolerance').value&
retour.=('#id').value&

*/
// FAIRE DES TRY AND CATCH
$params=array(	'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		'',
		4
				
);
$sql = "UPDATE users
        SET 	titre = ?,
		nom = ?,
		prenom = ?,
		initiale = ?,
		genre = ?,
		email = ?,
		type_ins = ?,
		institution = ?,
		type_instit = ?,
		laboratoire = ?,
		statut = ?,
		adresse = ?,
		ville = ?,
		zip = ?,
		etat = ?,
		pays = ?,
		mobile = ?,
		tel = ?,
		nationalite = ?,
		nb_resume = ?,
		alimentation = ?,
		intolerance = ?
        WHERE 	id=?";

echo $sql;
$requete = $connexion->prepare($sql);

$requete->execute($params);

}

?>
